﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Fastidious.Web
{
	/// <summary>
	/// Removes IIS7's incorrect ETag usage
	/// </summary>
	public class RemoveEtagModule : IHttpModule
	{
		#region IHttpModule Members

		public void Dispose()
		{
			
		}

		public void Init(HttpApplication context)
		{
			context.PreSendRequestHeaders += (o, e) =>
			{
				HttpContext.Current.Response.Headers.Remove("ETag");
			};
		}

		#endregion
	}
}